Optimizing the Use of Your Extension
You must include an extension optimization ('eopt'
) resource in your printing extension file to provide QuickDraw GX with information about when the extension needs to be loaded into memory. This information makes it possible to optimize the use of printing extensions, thus maximizing performance during the printing process. The optimization resource has an ID ofgxExtensionOptimizationID
.QuickDraw GX also uses the values in this resource to determine if your extension has
to be available on the user's system or on a print server if the user is printing from a print server on a network. For example, an extension that overrides messages during the despooling process needs to be available on the system that is communicating with the printer, while an extension that overrides messages during the spooling process needs
to be available on the system that is creating the spool file. You need to carefully choose which of the optimization flags to include in the extension optimization resource for your printing extension. Including the wrong flag can cause performance degradation or worse, so choose carefully from among the flag values. The constants for these flags, each of which is a Boolean value, are shown in Table 6-11 on page 6-30 in the chapter "Printing Resources."Listing 2-23 shows the extension optimization resource for the background picture printing extension, which modifies each page of a document as it is despooled.
Listing 2-23 An example of an extension optimization resource
resource 'eopt' (gxExtensionOptimizationID,sysHeap,purgeable) { { gxDontExecuteDuringImaging, gxDontNeedDeviceStatus, gxChangePageAtGXDespoolPage, gxDontChangePageAtGXImagePage, gxDontChangePageAtGXRenderPage, gxNotServerPresenceRequired, gxClientPresenceRequired }; };The despooling process during the imaging phase of printing is described in the chapter "Introduction to Printing Extensions and Drivers" in this book. TheGXDespoolPage
message is described on page 4-75, theGXImagePage
message is described on page 4-94, and theGXRenderPage
message is described on page 4-96 in the chapter "Printing Messages."
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help